package com.maimang.platform.controller.monitor;

import com.maimang.platform.base.BaseController;
import com.maimang.platform.common.server.Server;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Rocky
 * @version 1.0.0
 * @classname ServerController
 * @description 服务器监控
 * @date 2019-04-25 11:43
 * @email jintaozhao@qq.com
 */
@Controller
@RequestMapping("/monitor/server")
public class ServerController extends BaseController {

	private String prefix = "monitor/server";

	@RequiresPermissions("monitor:server:view")
	@GetMapping()
	public String server(ModelMap modelMap) throws Exception {
		Server server = new Server();
		server.initServer();
		modelMap.put("server", server);
		return prefix + "/server";
	}
}